<%-- 
    Document   : halamanTambahDosenPeneliti
    Created on : Oct 8, 2012, 2:20:31 PM
    Author     : user
--%>

<%@include file="../header.jsp"%>


<!-- end page-heading //sampai sini-->

<div class="clear"></div>

<!-- start content-outer -->
<div id="content-outer">
    <!-- start content -->
    <div id="content">


        <div id="page-heading"><h1>Tambah Publikasi HaKI</h1></div>


        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
            <tr>
                <th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
                <th class="topleft"></th>
                <td id="tbl-border-top">&nbsp;</td>
                <th class="topright"></th>
                <th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
            </tr>
            <tr>
                <td id="tbl-border-left"></td>
                <td>
                    <!--  start content-table-inner -->
                    <div id="content-table-inner">

                        <table border="0" width="100%" cellpadding="0" cellspacing="0">
                            <tr valign="top">
                                <td>
                                    <script>
                                        function validateForm()
                                        {        
                                        <%

                                            int jmlDosen = Integer.parseInt((String) ""+session.getAttribute("jmlDosenIn"));
                                            int b;
                                            for (b = 1; b <= jmlDosen; b++) {
                                        %>
                                                var dosen[<% out.print(b);%>] = true;
                                            
                                                if(document.frm.dosen[<% out.print(b);%>].value=="")
                                                {                                                
                                                    document.getElementById("dosen_error[<% out.print(b);%>]").innerHTML="<div class='error-left'></div><div class='error-inner'>Anggota Penelitian Belum Dipilih.</div>";
                                                    dosen = false;
                                                } else {
                                                    document.getElementById("dosen_error[<% out.print(b);%>]").innerHTML="";       
                                                }
                                            
                                                if(dosen[<% out.print(b);%>]){
                                                    return true;
                                                }else{
                                                    return false;
                                                }
                                        <%
                                            }
                                        %>
        
                                            }
                                    </script>
                                    <!--  start step-holder -->
                                    <div id="step-holder">
                                        <div class="step-no-off">1</div>
                                        <div class="step-light-left"><a href="">Data Publikasi HaKI</a></div>
                                        <div class="step-light-right">&nbsp;</div>
                                        <div class="step-no">2</div>
                                        <div class="step-dark-left">Data Pemilik HaKI</div>
                                        <div class="step-dark-right">&nbsp;</div>
                                        <div class="clear"></div>
                                    </div>
                                    <!--  end step-holder -->  
                                    <!-- start id-form -->
                                    <form name="frm" method="post" action="tambahPublikasiHaki?status=submitAnggota" onsubmit="return validateForm()">
                                        <table border="0" cellpadding="5" cellspacing="15"  id="id-form">
                                            <%
                                                int jumlahDosen = Integer.parseInt((String) ""+session.getAttribute("jmlDosenIn"));
                                                int jmlDosenEks = Integer.parseInt((String) ""+session.getAttribute("jmlDosenEks"));
                                                if (jumlahDosen > 0 || jmlDosenEks > 0) {
                                                    int count;
                                                    for (count = 1; count <= jumlahDosen; count++) {
                                            %>
                                            <tr>
                                                <th valign="top">Anggota Pemilik Haki (<% out.print(count);%>) <font color="red">*</font></th>
                                                <td width="15">:</td>
                                                <td>
                                                    <select name="dosen[<% out.print(count);%>]" id="dosen[<% out.print(count);%>]" class="styledselect_form_1">
                                                        <option value="">- Pilih Anggota Pemilik Haki -</option>
                                                        <c:forEach items="${dosen}" var="dosen">
                                                            <option value="${dosen.user.idUser}">${dosen.user.namaUser}</option>
                                                        </c:forEach>
                                                    </select>
                                                </td>
                                                <td id="dosen_error[<% out.print(count);%>]"></td>
                                            </tr> 
                                            <% }
                                                    int count2;
                                                    for (count2 = 1; count2 <= jmlDosenEks; count2++) {

                                            %>
                                            <tr>
                                                <th valign="top">Anggota Pemilik Haki Eksternal (<% out.print(count2);%>) <font color="red">*</font></th>
                                                <td width="15">:</td>
                                                <td>
                                                    <input type="text" name="pemilikEks[<% out.print(count2);%>]" id="pemilikEks[<% out.print(count2);%>]" class="inp-form"/>
                                                </td>
                                                <td id="pemilikEks_error[<% out.print(count2);%>]"></td>
                                            </tr> 
                                            <% }                                                   

                                            %>
                                            <% } else {

                                            %>
                                            <tr>
                                                <th>&nbsp;</th>
                                                <td></td>
                                                <td valign="top">Anggota Pemilik Haki Tidak Ada
                                                </td>
                                                <td></td>
                                            </tr>
                                            <% }

                                            %>
                                            <tr>
                                                <th>&nbsp;</th>
                                                <td></td>
                                                <td valign="top">
                                                    <input type="submit" value="" class="form-simpan" />
                                                    <input type="button" value="" class="form-kembali" onClick="history.go(-1);"/>
                                                </td>
                                                <td></td>
                                            </tr>
                                            
                                        </table>
                                    </form>
                                    <!-- end id-form  -->

                                </td>

                                <td>

                                    <!--  start related-activities -->
                                    <div id="related-activities">

                                        <!--  start related-act-top -->
                                        <div id="related-act-top">
                                            <img src="images/forms/header_related_act.gif" width="271" height="43" alt="" />
                                        </div>
                                        <!-- end related-act-top -->

                                        <!--  start related-act-bottom -->
                                        <div id="related-act-bottom">

                                            <!--  start related-act-inner -->
                                            <div id="related-act-inner">

                                                <!--<div class="left"><a href=""><img src="images/forms/icon_plus.gif" width="21" height="21" alt="" /></a></div>-->
                                                <div class="right">
                                                    <h5>Pengisian Data </h5>
                                                    Silakan isi data dengan teliti dan benar. Kolom yang bertanda <font color="red">* wajib diisi</font>.
                                                    <!--<ul class="greyarrow">
                                                        <li><a href="">Click here to visit</a></li> 
                                                        <li><a href="">Click here to visit</a> </li>
                                                    </ul>-->
                                                </div>

                                                <div class="clear"></div>
                                                <div class="lines-dotted-short"></div>

                                                <!--<div class="left"><a href=""><img src="images/forms/icon_minus.gif" width="21" height="21" alt="" /></a></div>-->

                                                <!--<div class="left"><a href=""><img src="images/forms/icon_edit.gif" width="21" height="21" alt="" /></a></div>-->

                                            </div>
                                            <!-- end related-act-inner -->
                                            <div class="clear"></div>

                                        </div>
                                        <!-- end related-act-bottom -->

                                    </div>
                                    <!-- end related-activities -->

                                </td>
                            </tr>
                            <tr>
                                <td><img src="images/shared/blank.gif" width="695" height="1" alt="blank" /></td>
                                <td></td>
                            </tr>
                        </table>

                        <div class="clear"></div>


                    </div>
                    <!--  end content-table-inner  -->
                </td>
                <td id="tbl-border-right"></td>
            </tr>
            <tr>
                <th class="sized bottomleft"></th>
                <td id="tbl-border-bottom">&nbsp;</td>
                <th class="sized bottomright"></th>
            </tr>
        </table>

        <div class="clear">&nbsp;</div>

    </div>
    <!--  end content -->
    <div class="clear">&nbsp;</div>
</div>
<!--  end content-outer -->



<div class="clear">&nbsp;</div>

<%@include file="../footer.jsp"%>